1. Field of the Invention
The present invention relates generally to electronic computing systems and more specifically to optimizing memory usage and system performance in a file system (e.g., resident on flash memory) requiring entire blocks to be erased for rewriting data.
2. Related Art
There are technologies which require an entire block of data to be erased even if only a portion (e.g., byte) of the block needs to be rewritten (i.e., write in locations which are already storing data). Flash memory is an example implementing such a technology. In general, a flash memory provides address, data and control signal interfaces to a computing device (such as a microprocessor), through which information (data, code, etc.) may be stored and retrieved.
Systems such as hand-held terminals, PDAs (personal digital assistant), cell phones etc., often use flash memories for storing code (software instructions) and data. Data may be organized as files and all actions (read, write, erase etc) on data may be facilitated by a file system. Such a file system for flash memories (called a flash file system or FFS) often provides a user application with suitable interfaces (such as function calls) through which various operations such as file create, append, erase, etc., may be performed.
A sector (block) in a flash memory may store data related to one or more files. In such a case, modification to one file may require the entire sector to be erased. Consequently, an FFS may need to relocate data of the other files (sharing the sector to be erased) to other sectors in flash. Further, an FFS may cause a single file to be stored in non-contiguous blocks of memory resulting in a segmented file structure, thus slowing system throughput (since a new access sequence may need to start for non-contiguous locations).
To overcome some of these undesirable effects, files may be copied from flash memory and stored in a RAM (random access memory) at system start-up time. This, however results in duplication of files and may be undesirable, especially in hand-held devices such as cell phones, PDAs, etc., due to the limited availability of resources. At least when handling certain types of files (such as MIDI files) where it is generally desirable to provide continuous stream of data, it may be desirable to have a file system optimize system performance and/or memory usage.
Accordingly, what is needed is a file system which addresses one or more of such requirements/problems described above.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.